﻿using System;
using System.Data;
using System.Collections;
using CE.Database;

/// <summary>
/// Summary description for CXPromotionDB
/// </summary>
/// 
namespace CE.Promotion
{
    public class CXPromotionDB
    {
        public CXPromotionDB()
        {
            //
            // TODO: Add constructor logic here
            //
        }

        public Int64 Insert(CXPromotion cxpromotion)
        {
            MyDatabase _db = new MyDatabase();
            Int64 _result = -1;
            string _spName = "[sprocCXPromotionQAInsertSingleItem]";

            SortedList _sPara = new SortedList();

            #region Parameter
            _sPara.Add("@CXPromoQAId", cxpromotion.CXPromoQAId);
            _sPara.Add("@IsFinancial", cxpromotion.IsFinancial);
            _sPara.Add("@Name", cxpromotion.Name);
            _sPara.Add("@ContactNo", cxpromotion.ContactNo);
            _sPara.Add("@Email", cxpromotion.Email);
            _sPara.Add("@CIExpiryMonth", cxpromotion.CIExpiryMonth);
            _sPara.Add("@ViewedDetailId", cxpromotion.ViewedDetailId);
            _sPara.Add("@Status", cxpromotion.Status);
            _sPara.Add("RefCEUserId", cxpromotion.RefCEUserId);
            #endregion

            _result = _db.ExecuteSP(_spName, _sPara);

            return _result;
        }

    }
}